package com.spring.demo.springdemo;

import java.math.BigDecimal;

/**
 * @Author RenPu
 * @Date 2024/2/17 9:11
 * @Version 1.0
 * @Description:
 **/
public class GoodService {

    private String goodName;

    private BigDecimal price;

//    public GoodService() {
//    }

    public GoodService(String goodName, BigDecimal price) {
        this.goodName = goodName;
        this.price = price;
        System.out.println("TWO  个参数的构造方法======= 被执行了=======");
    }



    public GoodService(String goodName) {
        this.goodName = goodName;
        System.out.println("ONE  个参数的构造方法======= 被执行了=======");
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }



    @Override
    public String toString() {
        return "GoodService{" +
                "goodName='" + goodName + '\'' +
                ", price=" + price +
                '}';
    }
}
